3.82 \(\int \frac{1-x^2}{1+4 x^2+x^4} \, dx\)

Optimal. Leaf size=44 \[ \frac{\tan ^{-1}\left (\frac{x}{\sqrt{2-\sqrt{3}}}\right )}{\sqrt{2}}-\frac{\tan ^{-1}\left (\frac{x}{\sqrt{2+\sqrt{3}}}\right )}{\sqrt{2}} \]

[Out]

ArcTan[x/Sqrt[2 - Sqrt[3]]]/Sqrt[2] - ArcTan[x/Sqrt[2 + Sqrt[3]]]/Sqrt[2]

________________________________________________________________________________________

Rubi [A]  time = 0.0288699, antiderivative size = 44, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.1, Rules used = {1163, 203} \[ \frac{\tan ^{-1}\left (\frac{x}{\sqrt{2-\sqrt{3}}}\right )}{\sqrt{2}}-\frac{\tan ^{-1}\left (\frac{x}{\sqrt{2+\sqrt{3}}}\right )}{\sqrt{2}} \]

Antiderivative was successfully verified.

[In]

Int[(1 - x^2)/(1 + 4*x^2 + x^4),x]

[Out]

ArcTan[x/Sqrt[2 - Sqrt[3]]]/Sqrt[2] - ArcTan[x/Sqrt[2 + Sqrt[3]]]/Sqrt[2]

Rule 1163

Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Di
st[e/2 + (2*c*d - b*e)/(2*q), Int[1/(b/2 - q/2 + c*x^2), x], x] + Dist[e/2 - (2*c*d - b*e)/(2*q), Int[1/(b/2 +
 q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[c*d^2 - a*e^2, 0] && GtQ[b^2
 - 4*a*c, 0]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{1-x^2}{1+4 x^2+x^4} \, dx &=\frac{1}{2} \left (-1-\sqrt{3}\right ) \int \frac{1}{2+\sqrt{3}+x^2} \, dx+\frac{1}{2} \left (-1+\sqrt{3}\right ) \int \frac{1}{2-\sqrt{3}+x^2} \, dx\\ &=\frac{\tan ^{-1}\left (\frac{x}{\sqrt{2-\sqrt{3}}}\right )}{\sqrt{2}}-\frac{\tan ^{-1}\left (\frac{x}{\sqrt{2+\sqrt{3}}}\right )}{\sqrt{2}}\\ \end{align*}

Mathematica [A]  time = 0.064603, size = 82, normalized size = 1.86 \[ \frac{-\left (\sqrt{3}-3\right ) \sqrt{2+\sqrt{3}} \tan ^{-1}\left (\frac{x}{\sqrt{2-\sqrt{3}}}\right )-\sqrt{2-\sqrt{3}} \left (3+\sqrt{3}\right ) \tan ^{-1}\left (\frac{x}{\sqrt{2+\sqrt{3}}}\right )}{2 \sqrt{3}} \]

Antiderivative was successfully verified.

[In]

Integrate[(1 - x^2)/(1 + 4*x^2 + x^4),x]

[Out]

(-((-3 + Sqrt[3])*Sqrt[2 + Sqrt[3]]*ArcTan[x/Sqrt[2 - Sqrt[3]]]) - Sqrt[2 - Sqrt[3]]*(3 + Sqrt[3])*ArcTan[x/Sq
rt[2 + Sqrt[3]]])/(2*Sqrt[3])

________________________________________________________________________________________

Maple [B]  time = 0.053, size = 111, normalized size = 2.5 \begin{align*}{\frac{\sqrt{3}}{\sqrt{6}-\sqrt{2}}\arctan \left ( 2\,{\frac{x}{\sqrt{6}-\sqrt{2}}} \right ) }-{\frac{1}{\sqrt{6}-\sqrt{2}}\arctan \left ( 2\,{\frac{x}{\sqrt{6}-\sqrt{2}}} \right ) }-{\frac{\sqrt{3}}{\sqrt{2}+\sqrt{6}}\arctan \left ( 2\,{\frac{x}{\sqrt{2}+\sqrt{6}}} \right ) }-{\frac{1}{\sqrt{2}+\sqrt{6}}\arctan \left ( 2\,{\frac{x}{\sqrt{2}+\sqrt{6}}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-x^2+1)/(x^4+4*x^2+1),x)

[Out]

3^(1/2)/(6^(1/2)-2^(1/2))*arctan(2*x/(6^(1/2)-2^(1/2)))-1/(6^(1/2)-2^(1/2))*arctan(2*x/(6^(1/2)-2^(1/2)))-3^(1
/2)/(2^(1/2)+6^(1/2))*arctan(2*x/(2^(1/2)+6^(1/2)))-1/(2^(1/2)+6^(1/2))*arctan(2*x/(2^(1/2)+6^(1/2)))

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} -\int \frac{x^{2} - 1}{x^{4} + 4 \, x^{2} + 1}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x^2+1)/(x^4+4*x^2+1),x, algorithm="maxima")

[Out]

-integrate((x^2 - 1)/(x^4 + 4*x^2 + 1), x)

________________________________________________________________________________________

Fricas [A]  time = 1.31292, size = 109, normalized size = 2.48 \begin{align*} \frac{1}{2} \, \sqrt{2} \arctan \left (\frac{1}{2} \, \sqrt{2}{\left (x^{3} + 3 \, x\right )}\right ) - \frac{1}{2} \, \sqrt{2} \arctan \left (\frac{1}{2} \, \sqrt{2} x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x^2+1)/(x^4+4*x^2+1),x, algorithm="fricas")

[Out]

1/2*sqrt(2)*arctan(1/2*sqrt(2)*(x^3 + 3*x)) - 1/2*sqrt(2)*arctan(1/2*sqrt(2)*x)

________________________________________________________________________________________

Sympy [A]  time = 0.110828, size = 42, normalized size = 0.95 \begin{align*} - \frac{\sqrt{2} \left (2 \operatorname{atan}{\left (\frac{\sqrt{2} x}{2} \right )} - 2 \operatorname{atan}{\left (\frac{\sqrt{2} x^{3}}{2} + \frac{3 \sqrt{2} x}{2} \right )}\right )}{4} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x**2+1)/(x**4+4*x**2+1),x)

[Out]

-sqrt(2)*(2*atan(sqrt(2)*x/2) - 2*atan(sqrt(2)*x**3/2 + 3*sqrt(2)*x/2))/4

________________________________________________________________________________________

Giac [A]  time = 1.14273, size = 35, normalized size = 0.8 \begin{align*} \frac{1}{4} \, \sqrt{2}{\left (\pi \mathrm{sgn}\left (x\right ) - 2 \, \arctan \left (\frac{\sqrt{2}{\left (x^{2} + 1\right )}}{2 \, x}\right )\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x^2+1)/(x^4+4*x^2+1),x, algorithm="giac")

[Out]

1/4*sqrt(2)*(pi*sgn(x) - 2*arctan(1/2*sqrt(2)*(x^2 + 1)/x))